SUBROUTINE TRANSS
* Display a Reality item, translated using RWA_TRANS.* Include the RealWeb definitions.
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP
* Start the HTML page.CALL RW_START_HTML_PAGE("TRANSS", "", "", "", "")* Read an item from a Reality file - we'll use the code of* the HELLOWORLD example.
ITEM = ""
OPEN "SUBROUTINE.EXAMPLES" TO F ELSE STOP
READ ITEM FROM F,"HELLOWORLD" ELSE STOP
CLOSE F
* Convert reserved HTML characters into escape sequences.* Highlight RealWeb subroutines, etc.CALL RWS_TRANS(ITEM, RWD_BLIST)* Format it as preformatted text.CALL RWS_FIXED(ITEM, "")* Since the text is now preformatted, having a <br> tag at* the end of each line means that we get two line feeds.* Remove the <br> tags, to close up the lines.
ITEM = CHANGE(ITEM, "<br>", "")
ITEM = CHANGE(ITEM, "<BR>", "")
* Output the text.CALL RW_PUT(ITEM)* Complete the page.CALL RW_END_PAGE
RETURN
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META NAME="Generator" CONTENT="Reality"><TITLE>TRANSS</TITLE></HEAD><BODY><PRE>
SUBROUTINE HELLOWORLD
* Display the text 'Hello World'
* Include the RealWeb definitions
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP
* Start the HTML page.
* Display the text 'Hello World' in the browser's title bar.
CALL <code style="color: red">RW_START_HTML_PAGE</code>("Hello World", "", "", "", "")
* Insert a paragraph containing the required text.
CALL <code style="color: red">RW_START_PARA</code>("", "")
CALL <code style="color: red">RW_PUT</code>("Hello World")
CALL <code style="color: red">RW_END_PARA</code>
* Complete the page.
CALL <code style="color: red">RW_END_PAGE</code>
RETURN
</PRE></BODY></HTML>